<?php
    try{
        $titulo = new Projeto_Texto();
        $titulo->setTitulo($_POST['txtBusca']);
        $busca = $titulo->Lista();
        foreach($busca as $key){
            if($key){
?>
<table width="100%" align="center">
<tr>
    <td width="30%" align="left">
        <?php echo htmlentities($key->titulo); ?>
    </td>
    <td  width="70%" align="left">
        <?php echo htmlentities($key->texto); ?>
    </td>
    <td  width="10%" align="center">
        <input type="button" name="btEditar" id="btEditar" value="Editar" class="botao" onclick="carregatexto('<?php echo $key->codigo; ?>');" />
    </td>
</tr>
</table>
<?php
            }
        }//fim foreach
    }catch(Exception $e){
        echo $e->getMessage();
    }
?>